/*
 * FileName: TextNFontEngine.cs
 * Module: 2D
 * Author: Gourav Das
 * Created: 04/06/2011
 * Modifications: 
 * Copyright: Gourav Das, 2011
 */

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace _22yards._2D
{
    /// <summary>
    /// Inherited from GameComponent
    /// </summary>
    public class TextNFontEngine:GameComponent
    {
        #region Members

        /// <summary>
        /// Gets the sp font pescadero.
        /// </summary>
        public SpriteFont spFontPescadero { get; private set; }

        /// <summary>
        /// Gets or sets the sp font pescadero bold.
        /// </summary>
        public SpriteFont spFontPescaderoBold { get; private set; }
        /// <summary>
        /// Gets the sp font acens.
        /// </summary>
        public SpriteFont spFontAcens { get; private set; }
        /// <summary>
        /// Gets the sp fontadventuresubtitles.
        /// </summary>
        public SpriteFont spFontAdventureSubtitles { get; private set; }
        /// <summary>
        /// Gets the sp fontbn3rd_place.
        /// </summary>
        public SpriteFont spFontBN3rd_Place { get; private set; }
        /// <summary>
        /// Gets the sp fontfakeplastic.
        /// </summary>
        public SpriteFont spFontFakePlastic { get; private set; }
        /// <summary>
        /// Gets the sp fontgoodtimes.
        /// </summary>
        public SpriteFont spFontGoodTimes { get; private set; }
        /// <summary>
        /// Gets the sp font andy.
        /// </summary>
        public SpriteFont spFontAndyBold { get; private set; }
        /// <summary>
        /// Gets the sp font jing jing.
        /// </summary>
        public SpriteFont spFontJingJing { get; private set; }
        /// <summary>
        /// Gets the sp font kootenay.
        /// </summary>
        public SpriteFont spFontKootenay { get; private set; }
        /// <summary>
        /// Gets the sp font lindsey.
        /// </summary>
        public SpriteFont spFontLindsey { get; private set; }
        /// <summary>
        /// Gets the sp font miramonte.
        /// </summary>
        public SpriteFont spFontMiramonte { get; private set; }
        /// <summary>
        /// Gets the sp font miramonte bold.
        /// </summary>
        public SpriteFont spFontMiramonteBold { get; private set; }
        /// <summary>
        /// Gets the sp font moire.
        /// </summary>
        public SpriteFont spFontMoire { get; private set; }
        /// <summary>
        /// Gets the sp font moire light.
        /// </summary>
        public SpriteFont spFontMoireLight { get; private set; }
        /// <summary>
        /// Gets the sp font moire bold.
        /// </summary>
        public SpriteFont spFontMoireBold { get; private set; }
        /// <summary>
        /// Gets the sp font moire extra bold.
        /// </summary>
        public SpriteFont spFontMoireExtraBold { get; private set; }
        /// <summary>
        /// Gets the sp font motorwerk.
        /// </summary>
        public SpriteFont spFontMotorwerk { get; private set; }
        /// <summary>
        /// Gets the sp font news gothic.
        /// </summary>
        public SpriteFont spFontNewsGothic { get; private set; }
        /// <summary>
        /// Gets the sp font news gothic bold.
        /// </summary>
        public SpriteFont spFontNewsGothicBold { get; private set; }
        /// <summary>
        /// Gets the sp font ocra extended.
        /// </summary>
        public SpriteFont spFontOcraExtended { get; private set; }
        /// <summary>
        /// Gets the sp font pericles.
        /// </summary>
        public SpriteFont spFontPericles { get; private set; }
        /// <summary>
        /// Gets the sp font pericles light.
        /// </summary>
        public SpriteFont spFontPericlesLight { get; private set; }
        /// <summary>
        /// Gets the sp font quartz.
        /// </summary>
        public SpriteFont spFontQuartzMS { get; private set; }
        /// <summary>
        /// Gets the sp font segoe keycaps.
        /// </summary>
        public SpriteFont spFontSegoeKeycaps { get; private set; }
        /// <summary>
        /// Gets the sp font segoe print.
        /// </summary>
        public SpriteFont spFontSegoePrint { get; private set; }
        /// <summary>
        /// Gets the sp font segoe print bold.
        /// </summary>
        public SpriteFont spFontSegoePrintBold { get; private set; }
        /// <summary>
        /// Gets the sp font segoi UI mono bold.
        /// </summary>
        public SpriteFont spFontSegoiUIMonoBold { get; private set; }
        /// <summary>
        /// Gets the sp font segoi UI mono.
        /// </summary>
        public SpriteFont spFontSegoiUIMono { get; private set; }
        /// <summary>
        /// Gets the sp font wasco sans.
        /// </summary>
        public SpriteFont spFontWascoSans { get; private set; }
        /// <summary>
        /// Gets the sp font wasco sans bold.
        /// </summary>
        public SpriteFont spFontWascoSansBold { get; private set; }
        /// <summary>
        /// Gets the sp font wasco sans italic.
        /// </summary>
        public SpriteFont spFontWascoSansItalic { get; private set; }
        /// <summary>
        /// Gets the sp font wasco sans bold italic.
        /// </summary>
        public SpriteFont spFontWascoSansBoldItalic { get; private set; }

        /// <summary>
        /// Private Member
        /// </summary>
        private SpriteBatch spBatch;
        #endregion

        #region Properties
        /// <summary>
        /// Gets or Sets the Text to be drawn onto the screen
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// Gets or Sets the Color of the Text to be drawn
        /// </summary>
        public Color colour { get; set; }

        /// <summary>
        /// Gets or Sets the Position of the Text to be drawn
        /// </summary>
        public Vector2 Position { get; set; }
        #endregion

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="game">Game that the game component should be attached to.</param>
        public TextNFontEngine(Game game):base(game)
        {
            // Create instances of the sprite font and batch
            spBatch = new SpriteBatch(game.GraphicsDevice);
            Text = string.Empty;
            spFontAcens = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/Acens");
            spFontAdventureSubtitles = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/AdventureSubtitles");
            spFontAndyBold = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/AndyBold");
            spFontBN3rd_Place = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/Bn3rdPlace");
            spFontFakePlastic = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/FakePlastic");
            spFontGoodTimes = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/GoodTimes");
            spFontJingJing = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/JingJing");
            spFontKootenay = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/Kootenay");
            spFontLindsey = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/Lindsey");
            spFontMiramonte = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/Miramonte");
            spFontMiramonteBold = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/MiramonteBold");
            spFontMoire = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/Moire");
            spFontMoireBold = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/MoireBold");
            spFontMoireExtraBold = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/MoireExtraBold");
            spFontMoireLight = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/MoireLight");
            spFontMotorwerk = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/Motorwerk");
            spFontNewsGothic = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/NewsGothic");
            spFontNewsGothicBold = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/NewsGothicBold");
            spFontOcraExtended = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/OCRAExtended");
            spFontPericles = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/Pericles");
            spFontPericlesLight = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/PericlesLight");
            spFontPescadero = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/Pescadero");
            spFontPescaderoBold = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/PescaderoBold");
            spFontQuartzMS = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/QuartzMS");
            spFontSegoeKeycaps = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/SegoeKeycaps");
            spFontSegoePrint = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/SegoePrint");
            spFontSegoePrintBold = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/SegoePrintBold");
            spFontSegoiUIMono = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/SegoeUIMono");
            spFontSegoiUIMonoBold = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/SegoeUIMonoBold");
            spFontWascoSans = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/WascoSans");
            spFontWascoSansBold = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/WascoSansBold");
            spFontWascoSansBoldItalic = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/WascoSansBoldItalic");
            spFontWascoSansItalic = this.Game.Content.Load<SpriteFont>("TwoDEE/Fonts/WascoSansItalic");

            colour = Color.White;
            Position = new Vector2(50.0f, 50.0f);
        }

        /// <summary>
        /// Overridden Dispose Method. Dispose all non managed components here.
        /// </summary>
        /// <param name="disposing"></param>
        protected override void Dispose(bool disposing)
        {
            spBatch.Dispose();
            base.Dispose(disposing);
        }
    }
}
